import request from "@/utils/request.js"

/* 查询停车场列表 */
export function listParking(params){
    return request({
        url:"/parking/list",
        method:"GET",
        params
    })
}

/* 查询停车场详情 */
export function listParkingDtl(parkingId){
    return request({
        url:`/parking/dtl/${parkingId}`,
        method:"GET",
    })
}

/* 添加停车场 */
//addParkihng多了一个h，我真服了...
export function addParking(data){
    return request({
        url:"/parking",
        method:"POST",
        data
    })
}

/* 编辑停车场 */
export function editParking(data){
    return request({
        url:"/parking",
        method:"PUT",
        data
    })
}

/* 删除停车场 */
export function deleteParking(parkingIds){
    return request({
        url:`/parking/${parkingIds}`,
        method:"DELETE",
    })
}